package otherdex;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.example.tys.multi_dex.R;

import otherdex.PingyinUtil;

/**
 * Created by tys on 2018/2/21.
 */

public class XActivity extends AppCompatActivity {
    public static String pws = "tys@123";
    private TextView tv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        tv = findViewById(R.id.tv);
        tv.setText(PingyinUtil.getPingYin("源"));
//        tv.setText("分包更新后");
    }

    public void bt(View v) {

        SharedPreferences sp = getSharedPreferences("setting", Context.MODE_PRIVATE);
        SharedPreferences.Editor editor = sp.edit();
        editor.putBoolean("forceReload", true);
        editor.commit();
        Toast.makeText(this, "重新打開看看", Toast.LENGTH_SHORT).show();
//        Toast.makeText(this, "更新后", Toast.LENGTH_SHORT).show();
    }

}
